/*
 * @Author: xiaosihan
 * @Date: 2024-12-01 02:34:33
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-12-01 03:41:59
 */

import { GoodsData } from '#/type';
import { observable, configure } from 'mobx';
configure({ enforceActions: 'never' });

const goodsDetailModalStore = observable(
  {
    open: false,
    goodsData: undefined as GoodsData | undefined,
    setGoodsData(goodsData: GoodsData | undefined) {
      this.goodsData = goodsData;
      this.open = Boolean(goodsData);
    },
  },
  {},
  { deep: false },
);

export default goodsDetailModalStore;
